import React from 'react'
import style from './style'
import Checkbox from '../ui-components/checkbox'
import Code from './Code'

export default 
class Test extends React.Component {

	state = {
		active: true
	}

	handleClick() {
		this.setState({
			active: !this.state.active
		})
	}

	render() {
		return (
			<div className={style.root}>
				<Code>{'<Checkbox label={..}/>'}</Code>
				<div>
					<Checkbox 
						active={this.state.active}
						onClick={::this.handleClick} 
						label="记住我"/>
				</div>
				<div>
					<Checkbox 
            disabled
						active={this.state.active}
						label="记住我"/>
				</div>
				<div>
					<Checkbox 
						disabled
						label="不可点击"/>
				</div>
			</div>
		)
	}
}
